@isTest
private class UpsertAccountForOrderTest {
    static testMethod void testMethod1() {
        

        Account dealer  = TestUtils.createAccount();
    	dealer.AccountNumber = '123456';
    	dealer.Name = 'dealer test';
    	dealer.RecordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('Dealer', 'Account');
    	insert dealer;

    	Account terminal = TestUtils.createAccount();
    	terminal.Name = 'test Account';
    	terminal.AccountNumber = '123457';
    	insert terminal;


    	 Map<String,String>data = new Map<String,String>();
        data.put('dealer','123456');
        data.put('terminalId',terminal.Id);
        System.debug(UpsertAccountForOrder.doPost(data));

        data.remove('terminalId');
        data.put('terminalName', 'add terminal account ');
        data.put('terminalProvince', '四川');

        System.debug(UpsertAccountForOrder.doPost(data));



    }
}